home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_actor_sophia.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  72 lines

  1. # Jones 3D Cog Script
  2. #
  3. # actor_Sophia.cog
  4. #
  5. # [RT]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ===================================================================
  10.  
  11. symbols
  12.  
  13.     message        created
  14.     message        damaged
  15.  
  16.     model        head0=head_so_asound.3do            local
  17.     model        head1=head_so_amsound.3do            local
  18.     model        head2=head_so_osound.3do            local
  19.     model        head3=head_so_helmet.3do            local
  20.     model        head4=head_so_helmet_asound.3do        local
  21.     model        head5=head_so_helmet_amsound.3do    local
  22.     model        head6=head_so_helmet_osound.3do        local
  23.  
  24.     sound        snd0=inxs001.wav                    local    # "Hey, point that thing the other way!"
  25.     sound        snd1=inxs002.wav                    local    # "Cut it out...that's not funny."
  26.     sound        snd2=inxs003.wav                    local    # "Stop it!"
  27.  
  28.     thing        sophia                                local
  29.  
  30.     int            newLine                                local
  31.     int            lastLine=-1                            local
  32.  
  33.     int            bTalking=0                            local
  34.  
  35. end
  36.  
  37. # ===================================================================
  38.  
  39. code
  40.  
  41. created:
  42.  
  43.     sophia = GetSenderRef();
  44.     SetThingVoiceHeads(sophia, "sohead", "", "head_so_asound.3do", "head_so_amsound.3do", "head_so_osound.3do");
  45.     return;
  46.  
  47. # -------------------------------------------------------------------
  48.  
  49. damaged:
  50.  
  51.     if (GetThingParent(GetSourceRef()) != GetLocalPlayerThing()) return;
  52.  
  53.     if (bTalking) return;
  54.  
  55.     bTalking = 1;
  56.  
  57.     sophia = GetSenderRef();
  58.  
  59.     while (newLine == lastLine)
  60.     {
  61.         newLine = RandBetween(0, 2);
  62.     }
  63.  
  64.     # Start the voice & wait...
  65.     PlayVoice(sophia, snd0[newLine], 1.0, 1);
  66.  
  67.     bTalking = 0;
  68.     lastLine = newLine;
  69.  
  70.     return;
  71.  
  72. end